﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/CompanyCenter.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	<%:SiteResource.Title() %>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ScriptContent" runat="server">
<script type="text/javascript" src="/Scripts/jquery-1.4.1.min.js"></script>
<script type="text/javascript">
    function CloseRecruiting(id) {
        if (confirm('您是否确定完成本次招募活动？')) {
            $('form').submit();
        }
    }
    function Control(sender,id, slt) {
        var msg = slt == 0 ? '您是否同意录用他/她？' : '您是否拒绝录用他/她？';
        if (confirm(msg)) {
            $.ajax({
                url: '/CompanyCenter/ControlResume',
                data: { id: id, type: slt },
                type: 'post',
                success: function (result) {
                    if (result == 0) {
                        $(sender).parent().html('<a href="javascript:;" style="color:Green; font-weight:bold;">已录用</a>');
                    }
                    else if (result == 1) {
                        $(sender).parent().html('<a href="javascript:;" style="color:Gray; font-weight:bold;">已拒绝</a>');
                    }
                    else {
                        alert('操作失败，请稍后再试');
                    }
                }
            });
        }
    }
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder" runat="server">
<div class="usercenter-main">
    <div class="usercenter-main-topbg">
    </div>
    <div class="usercenter-main-content">
        <div class="usercenter-main-content-title">
            <div class="usercenter-main-content-title-left">
                职位详情</div>
        </div>
        <div class="usercenter-notes">
            大学生兼职网提供免费兼职发布平台，请发布真实的兼职信息！若发现商家发布虚假兼职，我们将严厉处理！</div>
        <%var position = ViewData["Position"] as PositionModel; %>
        <div class="usercenter-main-content">
            <div class="usercenter-title">
                <div class="left">
                    <a href="javascript:;" title="点击管理兼职" class="jobtitle">【<%:position.RecruitSheet.WorkArea.Mapping() %>】<%:position.PositionName %></a></div>
                <div class="right">
                </div>
            </div>
            <div class="textboxs">
                <div class="left-label">
                    职位名称：</div>
                <div>
                    <%:position.PositionName %></div>
            </div>
            <div class="textboxs">
                <div class="left-label">
                    兼职类型：</div>
                <div>
                    <%:position.PositionType.Mapping()%></div>
            </div>
            <div class="textboxs">
                <div class="left-label">
                    性别要求：</div>
                <div>
                    <%:position.Gender.Mapping() %></div>
            </div>
            <div class="textboxs">
                <div class="left-label">
                    学历要求：</div>
                <div>
                    <%:position.Degree.Mapping() %></div>
            </div>
            <div class="textboxs">
                <div class="left-label">
                    经验要求：</div>
                <div>
                    <%:position.Experienced?"有经验者优先":"无要求" %></div>
            </div>
            <div class="textboxs">
                <div class="left-label">
                    招聘人数：</div>
                <div>
                    <%:position.Vacancy == 0 ? "若干" : position.Vacancy.ToString() + "人"%></div>
            </div>
            <div class="textboxs">
                <div class="left-label">
                    薪资范围：</div>
                <div>
                    <%
                        if (position.MinSalary > 0)
                        {
                            if (position.MaxSalary >= position.MinSalary)
                            {%> 
                            <%:position.MinSalary%> － <%:position.MaxSalary%> 元/<%:position.Period.Mapping()%>
                            <%}
                            else
                            {%>
                             <%:position.MinSalary%> 元/<%:position.Period.Mapping()%>  
                            <%}
                        }
                        else if (position.MaxSalary > 0)
                        {%>
                            <%:position.MaxSalary%> 元/<%:position.Period.Mapping()%>  
                        <%}
                        else
                        {%> 
                        面议
                        <%}%>
                </div>
            </div>
            <div class="textboxs">
                <div class="left-label">
                    兼职描述：</div>
                <div>
                    <%=position.PositionDescript %></div>
            </div>
            <div class="hspace">
            </div>
            <%if (position.RecruitSheet.IsVerify)
              { %>
            <div class="usercenter-title">
                <div class="left">
                    收到简历</div>
                <div class="right" style="margin-right: 16px">
                    共收到<%:position.RequestSheetes.Data == null ? 0 : position.RequestSheetes.Data.Count%>份简历</div>
            </div>
            <%if (position.RequestSheetes.Data != null && position.RequestSheetes.Data.Count > 0)
              {
                  foreach (var request in position.RequestSheetes.Data)
                  { %>
            <div class="listbox-item">
                <div class="listbox-item-title">
                    <div class="left">
                        [<%:request.PostDate.ToLongDateString()%>]&nbsp;<a target="_blank" href="/home/Resume_<%:request.ResumeId %>"><%:request.Title%></a></div>
                    <div class="right">
                        期望待遇:<%:request.Salary%>元/<%:request.Period.Mapping()%>&nbsp;&nbsp;
                        <%if (request.State == RequestState.Nornal)
                          { %>
                        <a href="javascript:;" onclick="Control(this, <%:request.Id %>,0)">录用</a>&nbsp;&nbsp;
                        <a href="javascript:;" onclick="Control(this, <%:request.Id %>,1)">拒绝</a>&nbsp;&nbsp;
                        <a target="_blank" href="/home/Resume_<%:request.ResumeId %>">简历详情</a>
                        <%}
                          else if (request.State == RequestState.Nod)
                          {%> 
                          <a href="javascript:;" style="color:Green; font-weight:bold;">已录用</a>
                        <%}
                          else
                          {%> 
                          <a href="javascript:;" style="color:Gray; font-weight:bold;">已拒绝</a>
                        <%} %>
                    </div>
                </div>
                <div class="listbox-item-bottomline">
                </div>
            </div>
            <%}%>
            <div class="listbox-bottom">
                    <div class="listbox-bottom-item">
                        <!--下一页-->
                        <%if (position.RequestSheetes.NextPage <= 0 || position.RequestSheetes.NextPage >= position.RequestSheetes.TotlePage-1)
                          { %>
                          <a class="next1" href="javascript:;"></a>
                        <%}
                          else
                          { %>
                        <a class="next" href="?id=<%:Request.QueryString["id"] %>&page=<%:position.RequestSheetes.NextPage %>"></a>
                        <%} %>
                    </div>
                    <div class="listbox-bottom-item">
                        <!--上一页-->
                        <%if (position.RequestSheetes.CurrentPage != 1 && position.RequestSheetes.PrePage <= 0)
                          { %>
                          <a class="prev1" href="javascript:;"></a>
                        <%}
                          else
                          { %>
                        <a class="prev" href="?id=<%:Request.QueryString["id"] %>&page=<%:position.RequestSheetes.PrePage %>"></a>
                        <%} %>
                    </div>
                    <div class="listbox-bottom-item">
                        <%:position.RequestSheetes.CurrentPage + 1%>/<%:position.RequestSheetes.TotlePage%>&nbsp;&nbsp;&nbsp;
                    </div>
                </div>
            <%}
              } %>
            <div class="hspace">
            </div>
            <div class="textboxs">
                <div class="left-label">
                    <a href="/CompanyCenter/Recruit">
                        <img src="/content/images/usercenter-return.png" /></a>
                </div>
            </div>
        </div>
    </div>
    <div class="usercenter-main-bottombg">
    </div>
</div>
</asp:Content>


